<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%
    if(session.getAttribute("userName")==null){ 
    	response.sendRedirect(request.getContextPath()+"/pages/admin/login.jsp");
    }
    %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>新增常识</title>
	<link href="<%=request.getContextPath() %>/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<style type="text/css"> 
<!--
body,td,th {
	font-size: 9pt;
}
.border-l-b-r-t {
	BORDER-RIGHT: #cecfce 1px solid; BORDER-TOP: #cecfce 1px solid; BORDER-LEFT: #cecfce 1px solid; BORDER-BOTTOM: #cecfce 1px solid
}
.main_table{
      font-size:12px;
}
.main_table input{
   border:1px FF9900 solid;
   background:#f9b88a;
 
 
}
 
.main_table textarea{
   border:1px FF9900 solid;
   background:#f9b88a;
 
 
}
-->
</style>
 
<!-- 添加留言 -->
<script language="javascript"> 
function check()
{
	if (form1.knowledgeSubject.value=="")
	{alert("主题不能为空！");
	form1.knowledgeSubject.focus();
	return false;
	}
 
	if (form1.knowledgeContent.value=="")
	{alert("留言内容不能为空！");
	form1.knowledgeContent.focus();
	return false;
	}
	return true;
}

function insert(){
	if(check()){
		document.form1.action = "KnowledgeServlet.do?method=insert";
		document.form1.submit();
	}
}
function list(){
	document.form1.action = "KnowledgeServlet.do?method=list";
	document.form1.submit();
}
</script>
<FORM name="form1" method="post" onSubmit="insert()">
<TABLE width="95%" border="0"  align="center" cellPadding="2" cellSpacing="0" class="main_table">
        <TR>
      <td height="20" colspan="2">&nbsp;</td>
      </TR>
      <TR>
        <TD noWrap align=right width="7%">主题： </TD>
        <TD width="93%"><INPUT name=knowledgeSubject class=inputstyle id="knowledgeSubject">
            <font color="#FF0000">*</font></TD>
      </TR>
      <TR>
        <TD noWrap align=right width="7%" >内容： </TD>
        <TD width="93%"><INPUT name=knowledgeContent cols=50 rows=6 id="knowledgeContent"></INPUT>
            <font color="#FF0000">*</font></TD>
      </TR>
      <TR>
        <TD noWrap align=right></TD>
        <TD><INPUT type=submit value=提交 name=Submit><INPUT type=button value=返回  name=back onclick="list();"/></TD>
      </TR>
</TABLE>
  </FORM>
</body>
</html>